//
//  SISSNetworkingManager+HouseProgress.m
//  SISSAPP
//
//  Created by 优房网 on 2017/8/24.
//  Copyright © 2017年 优房网. All rights reserved.
//

#import "SISSNetworkingManager+HouseProgress.h"

#import "SISSNetworkingManager+File.h"

@implementation SISSNetworkingManager (HouseProgress)

// 4.2.1 删除房源进度信息 GET请求
- (void)deleteHouseProgressWithHouseAhbpId:(NSString *)ahbpId successBlock:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_DELETE_HOUSE_PROGRESS parameters:parameters success:^(id responseObject) {
        NSLog(@"4.2.1 删除房源进度信息 GET请求: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.4.1 获取房源进度记录时间和id信息 GET请求
- (void)requestHouseProgressRecordInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSHouseProgressRecordInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_PROGRESS_INFO parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.4.1 获取房源进度记录时间和id信息: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
            return ;
        }
        
        NSDictionary *dataDict = responseObject[@"data"];
        
        SISSHouseProgressRecordInfoModel *model = [SISSHouseProgressRecordInfoModel yy_modelWithJSON:dataDict];
        if (successBlock) {
            successBlock(model);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.23.1  获取房源推荐的客源信息 GET请求
- (void)requestHouseRecommendPassengerWithAhbpId:(NSString *)ahbpId success:(void (^)(NSArray<SISSPassengerResourceModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {

    NSDictionary *parameters = @{
                                 @"spId":[SISSUserAccount shared].spId ,
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_HOUSE_RECOMMEND_DEMAND parameters:parameters success:^(id responseObject) {
        NSLog(@"4.23.1  获取房源推荐的客源信息: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *passengerResourceArr = [NSArray yy_modelArrayWithClass:[SISSPassengerResourceModel class] json:dataArr];
        if (successBlock) {
            successBlock(passengerResourceArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}


// 4.25.1.1 获取房源带看记录 GET请求
- (void)requestHouseTakelookRecordWithAhbpId:(NSString *)ahbpId success:(void (^)(NSArray<SISSHouseTakeLookModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_TAKELOOK_RECORD parameters:parameters success:^(id responseObject) {
        NSLog(@"4.25.1.1 获取房源带看记录 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *takelookArr = [NSArray yy_modelArrayWithClass:[SISSHouseTakeLookModel class] json:dataArr];
        if (successBlock) {
            successBlock(takelookArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}


// 4.25.1.2 获取房源带看记录详情 GET请求
- (void)requestHouseTakelookDetailWithId:(NSString *)ID type:(NSInteger)type success:(void (^)(SISSHouseTakeLookDetailModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"id":ID,
                                 @"type":@(type)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_TAKELOOK_DETAIL parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.25.1.2 获取房源带看记录详情 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        NSDictionary *dataDict = responseObject[@"data"];
        SISSHouseTakeLookDetailModel *takeLookDetail = [SISSHouseTakeLookDetailModel yy_modelWithJSON:dataDict];
        if (successBlock) {
            successBlock(takeLookDetail);
        }
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];

}

// 4.25.1.3.1  获取带看经纪人评价卖家 GET请求
- (void)requestCommentTakeLookBrokerCommentSellerInfoWithAtlrId:(NSString *)atlrId takelookType:(NSInteger)takelookType success:(void (^)(NSArray<SISSCommentModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"spId":[SISSUserAccount shared].spId,
                                 @"atlrId":atlrId,
                                 @"takelook_type":@(takelookType)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_TAKELOOK_BROKER_COMMENT_SELLER parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.25.1.3.1  获取带看经纪人评价卖家 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *modelArr = [NSArray yy_modelArrayWithClass:[SISSCommentModel class] json:dataArr];
        if (successBlock) {
            successBlock(modelArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.25.1.3.2  获取带看卖家评价经纪人 GET请求
- (void)requestCommentTakeLookSellerCommentBrokerInfoWithAtlrId:(NSString *)atlrId success:(void (^)(NSArray<SISSCommentModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"spId":[SISSUserAccount shared].spId,
                                 @"atlrId":atlrId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_TAKELOOK_SELLER_COMMENT_BROKER parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.25.1.3.2  获取带看卖家评价经纪人 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *modelArr = [NSArray yy_modelArrayWithClass:[SISSCommentModel class] json:dataArr];
        if (successBlock) {
            successBlock(modelArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.25.1.4  经纪人评价卖家
- (void)insertBrokerCommentSellerWithParameters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameter = @{
                                @"spId":[SISSUserAccount shared].spId,
                                };
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
    [params addEntriesFromDictionary:parameters];
    
    [kNetworkManager POSTWithURLString:URL_PROGRESS_INSERT_BROKER_COMMENT_SELLER parameters:params success:^(id responseObject) {
        NSLog(@"4.25.1.4  经纪人评价卖家: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        if (successBlock) {
            successBlock(responseObject);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.25.1.5  删除房源进度带看记录 GET请求
- (void)deleteHouseTakelookWithId:(NSString *)ID type:(NSInteger)type success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"id":ID,
                                 @"type":@(type)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_DELETE_HOUSE_TAKELOOK parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.25.1.5  删除房源进度带看记录 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        if (successBlock && [responseObject[@"code"] integerValue] == 200) {
            successBlock(responseObject);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}



// 4.29.1 添加进度委托合同 (图文上传)
- (void)insertHouseEntrustContractWithParameters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            NSMutableArray *dataArrM = responseObject[@"data"];
            NSDictionary *parameter = @{
                                        @"file":dataArrM,
                                        @"saId" : [SISSUserAccount shared].saId,
                                        };
            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
            [params addEntriesFromDictionary:parameters];
            
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_ENTRUST_CONTRACT parameters:params success:^(id responseObject) {
                NSLog(@"4.29.1 添加进度委托合同 (图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        }
    } failed:^(NSError * _Nonnull error) {
        NSLog(@"%@",error);
    }];
}


// 4.26.1.2 获取卖家委托合同卖家信息 GET请求
- (void)requestHouseProgressSellerCommissionContractSellerInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSSellerInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_COMMISSION_CONTRACT_SELLER_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.26.1.2 获取卖家委托合同卖家信息 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSDictionary *dataDict = responseObject[@"data"];
        SISSSellerInfoModel *sellerInfo = [SISSSellerInfoModel yy_modelWithJSON:dataDict];
        
        if (successBlock) {
            successBlock(sellerInfo);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.31.1 获取房屋状况说明书 GET请求
- (void)requestHouseProgressHouseStatusManualListAhrId:(NSString *)ahrId success:(void (^)(NSArray<SISSHouseConditionInfoModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"ahrId":ahrId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_STATUS_MANUAL_LIST parameters:parameters success:^(id responseObject) {
        NSLog(@" 4.31.1 获取房屋状况说明书 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSDictionary *dataArr = responseObject[@"data"];
        NSArray *modelArr = [NSArray yy_modelArrayWithClass:[SISSHouseConditionInfoModel class] json:dataArr];
        if (successBlock) {
            successBlock(modelArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.31.2 添加房屋状况说明书 (图文上传)
- (void)insertHouseStatusManualInfoWithParameters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images houseImages:(NSArray<UIImage *> *)houseImages success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    // 创建信号量
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
    // 创建全局并行
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
    dispatch_group_t group = dispatch_group_create();
    __block NSArray *fileArr = [NSArray array];
    dispatch_group_async(group, queue, ^{
        // 请求一
        [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
            NSLog(@"%@",responseObject);
            if ([responseObject[@"code"] integerValue] == 200) {
                fileArr = responseObject[@"data"];
                dispatch_semaphore_signal(semaphore);
            }
        } failed:^(NSError * _Nonnull error) {
            NSLog(@"%@",error);
        }];
    });
    __block NSArray *dataArr = [NSArray array];
    dispatch_group_async(group, queue, ^{
        // 请求二
        [kNetworkManager uploadFileListWatermark:houseImages success:^(id  _Nonnull responseObject) {
            NSLog(@"%@",responseObject);
            if ([responseObject[@"code"] integerValue] == 200) {
                dataArr = responseObject[@"data"];
                dispatch_semaphore_signal(semaphore);
            }
        } failed:^(NSError * _Nonnull error) {
            NSLog(@"%@",error);
        }];
    });
    dispatch_group_notify(group, queue, ^{
        // 两个请求对应两次信号等待
        dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
        dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
        
        //在这里 进行请求后的方法，回到主线程
        dispatch_async(dispatch_get_main_queue(), ^{
            if ([PublicUtil isBlankArr:fileArr]) return;
            if ([PublicUtil isBlankArr:dataArr]) return;
            NSDictionary *parameter = @{
                                        @"saId":[SISSUserAccount shared].saId,
                                        @"spId":[SISSUserAccount shared].spId,
                                        @"manual":fileArr,
                                        @"house":dataArr,
                                        };
            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
            [params addEntriesFromDictionary:parameters];
            
            if ([SISSPublicSingleton shared].isHud == YES) [SISSPublicSingleton shared].isHud = NO;
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_HOUSE_STATUS_MANUAL parameters:params success:^(id responseObject) {
                NSLog(@"4.31.2 添加房屋状况说明书 (图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        });
        
    });
}

// 4.31.3 获取房屋状况说明书 GET请求
- (void)requestHouseProgressHouseManualWithId:(NSString *)ID success:(void (^)(SISSHouseManualModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{
                                 @"id" : ID
                                 };
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_HOUSE_STATUS_MANUAL parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.31.3 获取房屋状况说明书 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSDictionary *dataDict = responseObject[@"data"];
        
        SISSHouseManualModel *houseManualModel = [SISSHouseManualModel yy_modelWithJSON:dataDict];
        if (successBlock) {
            successBlock(houseManualModel);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.31.4 更新房屋状况说明书 (图文上传) PUT请求
- (void)updateHouseStatusManualInfoWithParameters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images houseImages:(NSArray<UIImage *> *)houseImages success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    // 创建信号量
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
    // 创建全局并行
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
    dispatch_group_t group = dispatch_group_create();
    __block NSArray *fileArr = [NSArray array];
    dispatch_group_async(group, queue, ^{
        // 请求一
        if (images.count > 0) {
            [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
                NSLog(@"%@",responseObject);
                if ([responseObject[@"code"] integerValue] == 200) {
                    fileArr = responseObject[@"data"];
                    dispatch_semaphore_signal(semaphore);
                }
            } failed:^(NSError * _Nonnull error) {
                NSLog(@"%@",error);
            }];
        } else {
            dispatch_semaphore_signal(semaphore);
        }
    });
    __block NSArray *dataArr = [NSArray array];
    dispatch_group_async(group, queue, ^{
        // 请求二
        if (houseImages.count > 0) {
            [kNetworkManager uploadFileListWatermark:houseImages success:^(id  _Nonnull responseObject) {
                NSLog(@"%@",responseObject);
                if ([responseObject[@"code"] integerValue] == 200) {
                    dataArr = responseObject[@"data"];
                    dispatch_semaphore_signal(semaphore);
                }
            } failed:^(NSError * _Nonnull error) {
                NSLog(@"%@",error);
            }];
        } else {
            dispatch_semaphore_signal(semaphore);
        }
    });
    dispatch_group_notify(group, queue, ^{
        // 两个请求对应两次信号等待
        dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
        dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
        
        //在这里 进行请求后的方法，回到主线程
        dispatch_async(dispatch_get_main_queue(), ^{
            NSDictionary *parameter = @{
                                        @"saId":[SISSUserAccount shared].saId,
                                        @"spId":[SISSUserAccount shared].spId,
                                        @"manual":fileArr,
                                        @"house":dataArr,
                                        };
            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
            [params addEntriesFromDictionary:parameters];
            if ([SISSPublicSingleton shared].isHud == YES) [SISSPublicSingleton shared].isHud = NO;
            [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_UPDATE_HOUSE_STATUS_MANUAL parameters:params success:^(id responseObject) {
                NSLog(@"4.31.4 更新房屋状况说明书 (图文上传) PUT请求: responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        });
        
    });
}

// 4.32.1.1 获取经纪人评价卖家的记录 GET请求
- (void)requestCommentBrokerCommentSellerInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(NSArray<SISSCommentModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"spId":[SISSUserAccount shared].spId,
                                 @"ahbpId":ahbpId,
                                 @"comment_type":@(2),
                                 @"atlrId":@"-1",
                                 @"takelook_type":@(-1)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_BROKER_COMMENT_SELLER parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.32.1.1 获取经纪人评价卖家的记录 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *modelArr = [NSArray yy_modelArrayWithClass:[SISSCommentModel class] json:dataArr];
        if (successBlock) {
            successBlock(modelArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.32.1.2 获取卖家评价经纪人的记录 GET请求
- (void)requestCommentSellerCommentBrokerInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(NSArray<SISSCommentModel *> *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"spId":[SISSUserAccount shared].spId,
                                 @"ahbpId":ahbpId,
                                 @"comment_type":@(2),
                                 @"atlrId":@"-1",
                                 @"takelook_type":@(-1)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_SELLER_COMMENT_BROKER parameters:parameters success:^(id responseObject) {
        
        NSLog(@"4.32.1.2 获取卖家评价经纪人的记录 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSArray *dataArr = responseObject[@"data"];
        
        NSArray *modelArr = [NSArray yy_modelArrayWithClass:[SISSCommentModel class] json:dataArr];
        if (successBlock) {
            successBlock(modelArr);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.33.1 设置交易客源 GET请求
- (void)confirmTradeDemandWithParameters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_HOUSE_CONFIRM_TRADE_DEMAND parameters:parameters success:^(id responseObject) {
        NSLog(@"4.33.1 设置交易客源 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        if (successBlock) {
            successBlock(responseObject);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.33.2 获取交易客户 GET请求
- (void)requestTradeBuyerInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSPassengerResourceModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_HOUSE_CONFIRM_TRADE_BUYER parameters:parameters success:^(id responseObject) {
        NSLog(@"4.33.2 获取交易客户 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSDictionary *dataDict = responseObject[@"data"];
        SISSPassengerResourceModel *buyerInfo = [SISSPassengerResourceModel yy_modelWithJSON:dataDict];
        
        if (successBlock) {
            successBlock(buyerInfo);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.38.1 获取告知书卖家信息(线下)
- (void)requestImportNotiOfflineSellerInfoWithID:(NSString *)ID success:(void (^)(SISSSellerInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    
    NSDictionary *parameters = @{
                                 @"id":ID
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_SELLER_IMOPRTANT_NOTI_OFFLINE_SELLER_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.38.1 获取告知书卖家信息(线下) GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] != 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
        }
        
        NSDictionary *dataDict = responseObject[@"data"];
        SISSSellerInfoModel *sellerInfo = [SISSSellerInfoModel yy_modelWithJSON:dataDict];
        
        if (successBlock) {
            successBlock(sellerInfo);
        }
        
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}


// 4.25.1 添加房源带看记录  (图文上传)
- (void)insertHouseProgressTakeLookWithParameters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            NSArray *dataArr = responseObject[@"data"];
            NSDictionary *parameter = @{
                                        @"file":dataArr,
                                        };
            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
            [params addEntriesFromDictionary:parameters];
            if ([SISSPublicSingleton shared].isHud) [SISSPublicSingleton shared].isHud = NO;
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_HOUSE_TAKELOOK parameters:params success:^(id responseObject) {
                NSLog(@"4.25.1 添加房源带看记录 (图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        }
    } failed:^(NSError * _Nonnull error) {
        NSLog(@"%@",error);
    }];
}


// 4.1.26.1 插入担保机构
- (void)insertGuaranteeOrganInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_GUARANTEE_ORGAN parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.26.1 插入担保机构: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.26.2 获取担保机构 GET请求
- (void)requestGuaranteeOrganInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSGuaranteeCompanyModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_GUARANTEE_ORGAN parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.26.2 获取担保机构 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSGuaranteeCompanyModel *model = [SISSGuaranteeCompanyModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
        
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.26.3 修改担保机构 PUT请求
- (void)updateGuaranteeOrganInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_GUARANTEE_ORGAN parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.26.3 修改担保机构 PUT请求: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.27.1 插入房源进度公证信息
- (void)insertNotaryInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.27.1 插入房源进度公证信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.27.2 获取房源进度公证信息 GET请求
- (void)requestNotaryInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSReserveCommissionedNotaryModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.27.2 获取房源进度公证信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSReserveCommissionedNotaryModel *model = [SISSReserveCommissionedNotaryModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.27.3 修改房源进度公证信息 PUT
- (void)updateNotaryInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.27.3 修改房源进度公证信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.27.4 上传公证文件
- (void)insertNotaryInfoFileWithID:(NSString *)ID images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            NSArray *dataArr = responseObject[@"data"];
            NSDictionary *parameter = @{
                                        @"id":ID,
                                        @"saId":[SISSUserAccount shared].saId,
                                        @"file":dataArr
                                        };
            
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_NOTARY_INFO_FILE parameters:parameter success:^(id responseObject) {
                NSLog(@"4.1.27.4 上传公证文件 (图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        }
    } failed:^(NSError * _Nonnull error) {
        NSLog(@"%@",error);
    }];
}

// 4.1.28.1 插入进度资金监管信息
- (void)insertFundSupervisionInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_FUND_SUPERVISION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.28.1 插入进度资金监管信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.28.2 获取进度资金监管信息 GET请求
- (void)requestFundSupervisionInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSEscrowAccountInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_FUND_SUPERVISION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.28.2 获取进度资金监管信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSEscrowAccountInfoModel *model = [SISSEscrowAccountInfoModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.28.3 修改进度资金监管信息 PUT
- (void)updateFundSupervisionInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_FUND_SUPERVISION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.28.3 修改进度资金监管信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.29.1 插入房源进度担保公司批单信息
- (void)insertOrganApprovalInfoWithParamters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            NSArray *dataArr = responseObject[@"data"];
            NSDictionary *parameter = @{
                                        @"file":dataArr
                                        };
            NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
            [params addEntriesFromDictionary:parameters];
            
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_ORGAN_APPROVAL parameters:params success:^(id responseObject) {
                NSLog(@"4.1.29.1 插入房源进度担保公司批单信息 (图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        }
    } failed:^(NSError * _Nonnull error) {
        NSLog(@"%@",error);
    }];
}

// 4.1.29.2 获取房源进度担保公司批单信息 GET请求
- (void)requestOrganApprovalInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSOrganApprovalModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_ORGAN_APPROVAL parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.29.2 获取房源进度担保公司批单信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSOrganApprovalModel *model = [SISSOrganApprovalModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.29.3 修改房源进度担保公司批单信息 PUT
-(void)updateOrganApprovalInfoWithParamters:(NSDictionary *)parameters images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    if (images.count > 0) {
        [SISSPublicSingleton shared].isHud = NO;
        [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
            NSLog(@"%@",responseObject);
            if ([responseObject[@"code"] integerValue] == 200) {
                NSArray *dataArr = responseObject[@"data"];
                NSDictionary *parameter = @{
                                            @"file":dataArr
                                            };
                NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:parameter];
                [params addEntriesFromDictionary:parameters];
                [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_ORGAN_APPROVAL parameters:params success:^(id responseObject) {
                    NSLog(@"4.1.29.3 修改房源进度担保公司批单信息 PUT(图文上传): responseObject-->%@",responseObject);
                    
                    if (successBlock) {
                        successBlock(responseObject);
                    }
                } failure:^(NSError *error) {
                    if (failedBlock) {
                        failedBlock(error);
                    }
                }];
            }
        } failed:^(NSError * _Nonnull error) {
            NSLog(@"%@",error);
        }];
    } else {
        [SISSPublicSingleton shared].isHud = NO;
        [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_ORGAN_APPROVAL parameters:parameters success:^(id responseObject) {
            NSLog(@"4.1.29.3 修改房源进度担保公司批单信息 PUT(图文上传): responseObject-->%@",responseObject);
            
            if (successBlock) {
                successBlock(responseObject);
            }
        } failure:^(NSError *error) {
            if (failedBlock) {
                failedBlock(error);
            }
        }];
    }
}

// 4.1.30.1 插入还款赎楼信息
- (void)insertRepaymentInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_REPAYMENT_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.30.1 插入还款赎楼信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.30.2 获取还款赎楼信息 GET请求
- (void)requestRepaymentInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSRepaymentRedemptionModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_REPAYMENT_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.30.2 获取还款赎楼信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSRepaymentRedemptionModel *model = [SISSRepaymentRedemptionModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.30.3 修改还款赎楼信息 PUT
- (void)updateRepaymentInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_REPAYMENT_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.30.1 插入还款赎楼信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.31.1 插入取旧证注销抵押信息
- (void)insertMortgageInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_MORTGAGE_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.31.1 插入取旧证注销抵押信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.31.2 获取取旧证注销抵押信息 GET请求
- (void)requestMortgageInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSObtainEvidenceEnrollModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_MORTGAGE_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.31.2 获取取旧证注销抵押信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSObtainEvidenceEnrollModel *model = [SISSObtainEvidenceEnrollModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.31.3 修改取旧证注销抵押信息 PUT
- (void)updateMortgageInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_MORTGAGE_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.31.3 修改取旧证注销抵押信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.32.1 插入买卖合同公证信息
- (void)insertBusinessContractNotaryInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_BUSINESS_CONTRACT_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.32.1 插入买卖合同公证信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.32.2 获取买卖合同公证信息 GET请求
- (void)requestBusinessContractNotaryInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSBusinessContractNotaryModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_BUSINESS_CONTRACT_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.32.2 获取买卖合同公证信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSBusinessContractNotaryModel *model = [SISSBusinessContractNotaryModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.32.3 修改买卖合同公证信息 PUT
- (void)updateBusinessContractNotaryInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_BUSINESS_CONTRACT_NOTARY_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.32.3 修改买卖合同公证信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.32.4 上传买卖合同公证文件息(图文上传)
- (void)insertBusinessContractNotaryInfoFileWithID:(NSString *)ID images:(NSArray<UIImage *> *)images success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager uploadFileListWatermark:images success:^(id  _Nonnull responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            NSArray *dataArr = responseObject[@"data"];
            NSDictionary *parameter = @{
                                        @"id":ID,
                                        @"saId":[SISSUserAccount shared].saId,
                                        @"file":dataArr
                                        };
            
            [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_BUSINESS_CONTRACT_NOTARY_INFO_FILE parameters:parameter success:^(id responseObject) {
                NSLog(@"4.1.32.4 上传买卖合同公证文件息(图文上传): responseObject-->%@",responseObject);
                
                if (successBlock) {
                    successBlock(responseObject);
                }
            } failure:^(NSError *error) {
                if (failedBlock) {
                    failedBlock(error);
                }
            }];
        }
    } failed:^(NSError * _Nonnull error) {
        NSLog(@"%@",error);
    }];
}

// 4.1.33.1 插入过户登记预约信息
- (void)insertTransferReservationInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_TRANSFER_RESERVATION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.33.1 插入过户登记预约信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.33.2 获取过户登记预约信息 GET请求
- (void)requestTransferReservationInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSBusinessContractNotaryModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_TRANSFER_RESERVATION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.33.2 获取过户登记预约信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSBusinessContractNotaryModel *model = [SISSBusinessContractNotaryModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.33.3 修改过户登记预约信息 PUT
- (void)updateTransferReservationInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_TRANSFER_RESERVATION_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.33.3 修改过户登记预约信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.34.1 插入解冻信息
- (void)insertThawInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_THAW_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.34.1 插入解冻信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.34.2 获取解冻信息 GET请求
- (void)requestEscrowTrawnInfoWithAhbpId:(NSString *)ahbpId success:(void (^)(SISSEscrowTrawInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{@"ahbpId": ahbpId};
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_THAW_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.34.2 获取解冻信息 GET请求: responseObject-->%@",responseObject);
        if ([responseObject[@"code"] integerValue] == 200) {
            SISSEscrowTrawInfoModel *model = [SISSEscrowTrawInfoModel yy_modelWithJSON:responseObject[@"data"]];
            if (successBlock) {
                successBlock(model);
            }
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}
// 4.1.34.3 修改解冻信息 PUT
- (void)updateThawInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager PUTWithURLString:URL_PROGRESS_PUT_THAW_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.34.3 修改解冻信息 PUT: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.1.35.1 插入交房信息
- (void)insertHandHouseInfoWithParamters:(NSDictionary *)parameters success:(void (^)(id))successBlock failed:(void (^)(NSError *))failedBlock {
    [SISSPublicSingleton shared].isHud = NO;
    [kNetworkNoUTF8Manager POSTWithURLString:URL_PROGRESS_INSERT_HAND_HOUSE_INFO parameters:parameters success:^(id responseObject) {
        NSLog(@"4.1.35.1 插入交房信息: responseObject-->%@",responseObject);
        
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

// 4.2.36.1 获取卖家信息 GET请求
- (void)requestProgressSellerInfoWithAhbpId:(NSString *)ahbpId houseType:(NSInteger)houseType success:(void (^)(SISSSellerInfoModel *))successBlock failed:(void (^)(NSError *))failedBlock {
    NSDictionary *parameters = @{
                                 @"ahbpId":ahbpId,
                                 @"house_type":@(houseType)
                                 };
    
    [kNetworkManager GETWithURLString:URL_PROGRESS_GET_SELLER_INFO_BY_AHBPID parameters:parameters success:^(id responseObject) {
        NSLog(@"4.2.36.1 获取卖家信息 GET请求: responseObject-->%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] == 200) {
            
            NSLog(@"%@",responseObject[@"data"]);
            NSDictionary *dataDict = responseObject[@"data"];
            SISSSellerInfoModel *sellerInfo = [SISSSellerInfoModel yy_modelWithJSON:dataDict];
            
            if (successBlock) {
                successBlock(sellerInfo);
            }
        }
  
    } failure:^(NSError *error) {
        
        if (failedBlock) {
            failedBlock(error);
        }
    }];
}

@end
